cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

project(SDK CXX C)

file(
    GLOB_RECURSE
    DIARY_APP_SDK_SRC
    *.*
)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${DIARY_APP_SDK_SRC})
add_library(DiaryCore SHARED ${DIARY_APP_SDK_SRC})
target_compile_definitions(DiaryCore PRIVATE -DDIARY_APP_SDK_BUILD)
target_include_directories(DiaryCore PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/base_lib)
if (WIN32)
  target_link_libraries(DiaryCore PRIVATE Shlwapi Pathcch)
endif()
target_link_libraries(DiaryCore PUBLIC fmt::fmt Dexode::EventBus)
target_link_libraries(DiaryCore PRIVATE Threads::Threads nfd)

set_target_properties(DiaryCore PROPERTIES FOLDER "Application")
